package dynamic_proxy;

import org.junit.Test;

public class test {

    @Test
    public void testDemo(){
        CreateProxy createProxy = new CreateProxy(); //创建一个生成代理对象的类

        Subject person = new Person();  //创建一个被代理的对象
        Subject proxy = (Subject) createProxy.CreateProxy(person);
        //传进去一个被代理的对象
        proxy.SellHouse();

    }


}
